package com.newsmanagement.mapper;

import com.newsmanagement.domain.pojo.NodeInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SlauNodeInfoMapper {
    // 查询所有养殖企业（type=1）
    @Select("SELECT node_id, name, code FROM node_info WHERE type = 1")
    List<NodeInfo> selectFarmCompanies();

    // 查询所有屠宰企业（type=2）
    @Select("SELECT node_id, name, code FROM node_info WHERE type = 2")
    List<NodeInfo> selectSlauCompanies();
}